package atom.engine.proof.tree;

import java.util.List;

import atom.tree.ContentProvider;

public class ProofTreeContentProvider implements ContentProvider<ProofTreeNode> {

	@Override
	public String getLabel(ProofTreeNode node) {
		return node.getConnective();
	}

	@Override
	public int getLevel(ProofTreeNode node) {
		return node.getLevel();
	}

	@Override
	public boolean hasChildren(ProofTreeNode node) {
		return node.getChildren() != null && node.getChildren().size() > 0;
	}

	@Override
	public List<ProofTreeNode> getChildren(ProofTreeNode node) {
		return node.getChildren();
	}

	@Override
	public ProofTreeNode getParent(ProofTreeNode node) {
		return node.getParent();
	}

}
